﻿namespace ServiceLibrary
{
    internal class KeyProvider
    {
        //todo:高效率的密钥缓存
        public KeyProvider()
        {
            ServiceRepository.Printf("Model - DESKeyManageer - init OK");
        }

        public static void GetUserKey(int uid, out string key, out string iv)
        {
            DataManagement.DesKeyLoader(uid, out key, out iv);
        }

        public static bool SetUserKey(int uid, string key, string iv)
        {
            return DataManagement.DesKeySaver(uid, key, iv);
        }
    }
}